import request from '@/config/axios'

// 周计划反馈 VO
export interface WeeklyPlanFeedbackVO {
  id: number // 编号
  dailyId: number // 每日内容ID
  weeklyType: string // 周计划类型
  feedbackType: string // 反馈类型
  title: string // 反馈标题
  description: string // 反馈详细内容
  fileUrls: string // 附件
  sort: number // 排序
  status: number // 状态
}

// 周计划反馈 API
export const WeeklyPlanFeedbackApi = {
  // 查询周计划反馈分页
  getWeeklyPlanFeedbackPage: async (params: any) => {
    return await request.get({ url: `/school/weekly-plan-feedback/page`, params })
  },

  // 查询周计划反馈详情
  getWeeklyPlanFeedback: async (id: number) => {
    return await request.get({ url: `/school/weekly-plan-feedback/get?id=` + id })
  },

  // 新增周计划反馈
  createWeeklyPlanFeedback: async (data: WeeklyPlanFeedbackVO) => {
    return await request.post({ url: `/school/weekly-plan-feedback/create`, data })
  },

  // 修改周计划反馈
  updateWeeklyPlanFeedback: async (data: WeeklyPlanFeedbackVO) => {
    return await request.put({ url: `/school/weekly-plan-feedback/update`, data })
  },

  // 删除周计划反馈
  deleteWeeklyPlanFeedback: async (id: number) => {
    return await request.delete({ url: `/school/weekly-plan-feedback/delete?id=` + id })
  },

  // 导出周计划反馈 Excel
  exportWeeklyPlanFeedback: async (params) => {
    return await request.download({ url: `/school/weekly-plan-feedback/export-excel`, params })
  },
}